package edu.umd.ion.wavemeter.service;

import com.google.gwt.user.client.rpc.IsSerializable;

/**
 * Settings for the PID regulator of one channel
 * @author pmaunz
 *
 */
public class PIDSettings implements IsSerializable {
	public double P, I, D, Ta, dt, Sensitivity;
	public int DeviationUnit, SensitivityDimension;
	public boolean UseTa, Constantdt, Polarity, AutoClearHistory, LockEnabled;
	
	/**
	 * Channel index
	 */
	public int Channel;
	/**
	 * Course of the PID. Setpoint either as single value or as formula. 
	 * Time after enabling the lock is available as 't'. Most standard functions
	 * are available. In addition there is 
	 * @see edu.umd.ion.wavemeter.server.jep.Triangle
	 * @see edu.umd.ion.wavemeter.server.jep.Rectangle
	 * @see edu.umd.ion.wavemeter.server.jep.Doublestep
	 * @see edu.umd.ion.wavemeter.server.jep.Triplestep
	 * @see edu.umd.ion.wavemeter.server.jep.DoublestepRamp
	 * @see edu.umd.ion.wavemeter.server.jep.TriplestepRamp
	 */
	public String Course;
	/**
	 * Serial number to facilitate updating of other clients in case settings are changed on
	 * a different client.
	 */
	public int Serial;
	
	public PIDSettings(int channel) {
		Channel = channel;
	}
	
	public PIDSettings() {}
}
